import { $get } from '@js/request'
import { CaseSchema } from '@src/components/schema/caseSchema';
import { ConditionSchema } from '@src/components/schema/condition';
import { TablePaginationConfig } from 'antd';

export async function getCaseListRequest (
  condition: ConditionSchema[],
  pagination: TablePaginationConfig
): Promise<{ list: CaseSchema[], total: number, sum_dispute_amount: number, sum_counter_dispute_amount: number, total_counter: number }> {
  const res = await $get('/api/commission/case', {
    page: pagination.current,
    limit: pagination.pageSize,
    condition: JSON.stringify(condition)
  })
  return res.data
}
